package asf.core
{
	public class BaseApplication extends BaseLoadable
	{
		private var app:Application;
		
		public function BaseApplication( p_app:Application )
		{
			super( p_app );
			app = p_app;
		}
		
		protected function getDictionaryFiles( dictParentNode:XML ):Array
		{
			var res:Array = new Array( );
			var dictAttr:String = app.getParsedValueOf( dictParentNode.@dictionaryfile );
			var dictNode:XMLList;
			var dict:XML;
			
			if( dictAttr.length > 0 )
			{
				res.push( dictAttr );
			}
			
			dictNode = dictParentNode.dictionaryfile;
			
			if( dictNode.length( ) > 0 )
			{
				if( dictNode.length( ) == 1 && ( dictNode[ 0 ] as XML ).nodeKind( ) == "text" )
				{
					res.push( app.getParsedValueOf( String( dictNode ) ) );
				}
				else
				{
					for each( dict in dictNode )
					{
						res.push( app.getParsedValueOf( String( dict ) ) );
					}
				}
			}
			
			return  res;
		}
	}
}